package com.lkd.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.lkd.entity.PolicyEntity;
import com.lkd.http.vo.ApplyPolicyReq;
import com.lkd.http.vo.PolicyReq;
import com.lkd.vo.Pager;
import com.lkd.vo.PolicyVO;
import com.lkd.vo.VmVO;

import java.util.ArrayList;

public interface PolicyService extends IService<PolicyEntity> {

    /**
     * 搜索
     * @param pageIndex
     * @param pageSize
     * @param policyName
     * @return
     */
     Pager<PolicyEntity> search(Long pageIndex, Long pageSize, String policyName) ;

    /**
     * 创建策略
     * @param policyReq
     * @return
     */
     boolean add(PolicyReq policyReq);



    /**
     *
     * @param policyId
     * @return
     */
    boolean remove(String policyId);

    boolean modifyPlicy(Integer policyId, PolicyReq policyReq);

    PolicyVO getPolicy(String innerCode);

    boolean cancelPolicy(Long innerCode, Long policyId);

    ArrayList<PolicyVO> getPolicyList();

    boolean applyPolicy(ApplyPolicyReq req);

    Pager<VmVO> getVmList(Integer policyId, Long pageIndex, Long pageSize);
}
